#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>
#include <QTimer>
#include <QElapsedTimer>

QT_BEGIN_NAMESPACE
namespace Ui { class Widget; }
QT_END_NAMESPACE

class Widget : public QWidget
{
    Q_OBJECT

public:
    explicit Widget(QWidget *parent = nullptr);
    virtual ~Widget();

private:
    QTimer *m_timer;
    QElapsedTimer m_counter;

private slots:
    void do_timer_timeout();
    void do_timer_shot();
    void on_pushButtonStart_clicked();
    void on_pushButtonStop_clicked();
    void on_pushButtonOneShot_clicked();

private:
    Q_DISABLE_COPY(Widget)

    Ui::Widget *ui;
};

#endif // WIDGET_H
